﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HenIT.BizTalk.Objects
{
    public class BoolMatch : IComparable
    {
        public bool Match { get; set; }
        private bool boolValue = false;
        public bool Value
        {
            get { return boolValue; }
            set
            {
                boolValue = value;
                Match = boolValue == boolValue2;
            }
        }
        private bool boolValue2 = false;
        public bool Value2
        {
            get { return boolValue2; }
            set
            {
                boolValue2 = value;
                Match = boolValue == boolValue2;
            }
        }

        public BoolMatch(bool isTrue)
        {
            Value = isTrue;
        }

        public override string ToString()
        {
            return Value.ToString();
        }

        #region IComparable Members
        public int CompareTo(object obj)
        {
            return CompareTo((BoolMatch)obj);
        }
        public int CompareTo(BoolMatch obj)
        {
            return Value.CompareTo(obj.Value);
        }
        #endregion
    }
}
